package me.aip.mov.response;


import java.io.Serializable;
import java.util.Objects;

public enum ResultCode implements Serializable {


    ACCESS_LIMIT("101", "请求太频繁, 请稍后再试"),
    TOKEN_LOSED("102", "签名缺失!"),
    TOKEN_FAIL("401", "签名校验失败!"),
    TOKEN_EXPIRED("401", "签名已过期,请重新登录!"),
    INVOKING_SUCCESS("200", "调用成功"),
    INVOKING_ERROR("500", "操作失败"),
    PARAM_LOSED("10001", "参数缺失!"),


    ;
    private String code;
    private String message;

    public String getMessage() {
        return Objects.isNull(this.message) ? "" : this.message;
    }

    private ResultCode(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return this.code;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
